//
//  UIColor+Normal.h
//  DS_PJ_01
//
//  Created by admin on 16/7/16.
//  Copyright © 2016年 zhiqiyun. All rights reserved.
//

#import <UIKit/UIKit.h>

//结构体,初始化:
//struct SetRGB setRGB = {1, 1, 1};

struct SetRGB{
    float red;
    float green;
    float blue;
};


//typedef struct {
//    float red;
//    float green;
//    float blue;
//    float alpha;
//}RGB_Color;



//RGB颜色
#define RGB(r, g, b, A) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:A]

//调用例子:UIColorFromRGB(0x3098ff)
#define UIColorFromRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]

@interface  UIColor(Normal)

+ (UIColor *)colorWithHexString:(NSString *)color;

//从十六进制字符串获取颜色，
//color:支持@“#123456”、 @“0X123456”、 @“123456”三种格式
+ (UIColor *)colorWithHexString:(NSString *)color alpha:(CGFloat)alpha;


@end
